﻿namespace EyeOpen.DataDriven.Web
{
    using System.ComponentModel;
    using System.Configuration;
    using EyeOpen.DataDriven.Domain;
    using EyeOpen.Presentation;

    [DataObject]
    public class PersonDataSource : ObjectDataSourceHelper<Person>
    {   
        private readonly string connectionName = "EyeOpen.AddressBook";

        public override string ProviderName
        {
            get
            {
                return ConfigurationManager.ConnectionStrings[this.connectionName].ProviderName;
            }
        }

        public override string ConnectionString
        {
            get 
            {
                return ConfigurationManager.ConnectionStrings[this.connectionName].ConnectionString;
            }
        }

        public override string TableName
        {
            get 
            {
                return "People";
            }
        }
    }
}